package ast.statement.delete

import ast.expr.SqlBinaryExpr
import ast.expr.SqlBinaryOperator
import ast.expr.SqlExpr
import ast.statement.SqlStatement

data class SqlDelete(var table: SqlExpr? = null, var where: SqlExpr? = null) : SqlStatement {
    fun addCondition(condition: SqlExpr) {
        where = if (where != null) {
            SqlBinaryExpr(where!!, SqlBinaryOperator.AND, condition)
        } else {
            condition
        }
    }
}